package com.think.teaching.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;

import java.io.Serializable;

/**
 * <p>
 * 专业
 * </p>
 *
 * @author think
 * @since 2020-08-12
 */
public class Major extends BaseModel<Major> {

    private static final long serialVersionUID=1L;

    /**
     * 主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 专业名称
     */
    private String majorName;

    /**
     * 院系id
     */
    private Integer college;

    @TableField(exist = false)
    private College collegeData;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getMajorName() {
        return majorName;
    }

    public void setMajorName(String majorName) {
        this.majorName = majorName;
    }

    public Integer getCollege() {
        return college;
    }

    public void setCollege(Integer college) {
        this.college = college;
    }

   
    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Major{" +
        "id=" + id +
        ", majorName=" + majorName +
        ", college=" + college +
        ", createdBy=" + createdBy +
        ", createdTime=" + createdTime +
        ", updatedBy=" + updatedBy +
        ", updatedTime=" + updatedTime +
        ", state=" + state +
        ", delflag=" + delflag +
        "}";
    }

	public College getCollegeData() {
		return collegeData;
	}

	public void setCollegeData(College collegeData) {
		this.collegeData = collegeData;
	}
}
